import request from '@/utils/request'

// 创建房屋租户信息
export function createRentals(data) {
  return request({
    url: '/system/rentals/create',
    method: 'post',
    data: data
  })
}
//通过id查询房屋
export function getHousepapa(params) {
  return request({
    url: '/system/rentals/search',
    method: 'get',
    params
  })
}
// 更新房屋租户信息
export function updateRentals(data) {
  return request({
    url: '/system/rentals/update',
    method: 'put',
    data: data
  })
}

// 删除房屋租户信息
export function deleteRentals(id) {
  return request({
    url: '/system/rentals/delete?id=' + id,
    method: 'delete'
  })
}

// 获得房屋租户信息
export function getRentals(id) {
  return request({
    url: '/system/rentals/get?id=' + id,
    method: 'get'
  })
}

// 获得房屋租户信息分页
export function getRentalsPage(params) {
  return request({
    url: '/system/rentals/page',
    method: 'get',
    params
  })
}
// 导出房屋租户信息 Excel
export function exportRentalsExcel(params) {
  return request({
    url: '/system/rentals/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
